<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>三角形</title>
    <style>
        /**{
            box-sizing: border-box;
            font-family: cursive;
        }
        span{
            border:1px solid #000;
            display: inline-block;
            padding: 0 5px 0 5px;
            width: 80px;
        }*/
        table{
            border-collapse: collapse;
        }
        td{
            padding: 3px 10px ;
            border: 1px solid #000;

        }
    </style>
</head>
<body>
    <script>
       /* var sum =0;
        for(var i=1; i<= 5 ;i++){
            var p = prompt("请输入第" + i + "门成绩");
            p = Number(p);
            sum += p;
            console.log(p);
        }
        alert("五门功课的平均分是" + sum / 5);
        */
        
        /*var m = 2016;
        for(var i = 250000 ; i<=1000000; i++){
            i = i * 1.25;
            m++;
        }
        alert("到"+m+"年的时候到达100万人");*/
        
        /*for(var c = 1 ; c <= 3 ; c++){
            var sum =0;
            for(var i=1; i<= 5 ;i++){
                var p = prompt(c +"班的，第"+ i + "名同学成绩");
                p = Number(p);
                sum += p;
            }
            alert("五门功课的平均分是" + sum / 5);
        
        }*/
        
        /*for (var c = 1 ; c<=3; c++){
            for(var i = 0 ; i <=5; i++){
                document.write("*");
            }
            document.write("<br>");
        }*/
        
        
//直角三角形        
      /*  for (var c = 1 ; c < 6; c++){
            for(var i = 0 ; i < c; i++){
                document.write("*");
            }
            document.write("<br>");
        }

       document.write("<p></p>");

       for (var a = 1 ; a < 6; a++){
           for(var b = 0 ; b < 6-a; b++){
               document.write("*");
           }
           document.write("<br>");
       }

       document.write("<p></p>");




       for (var e = 0 ; e < 5; e++){
           for(var k = 0 ; k < 3-e+1 ; k++){
               document.write("&nbsp;");
           }
           for (var s = 0 ; s <= e ; s++){
               document.write("*");
           }
           document.write("<br>");
       }*/



       //九九乘法表
        /*for (var j = 1 ; j <= 9 ;j++){
            for (var i = 1 ; i <= j ; i++){
                document.write("<span>"+i +"×"+ j+"="+ i * j +"</span>");
            }
            document.write("<br>");
        }*/

       document.write("<table>");
       for (var j = 1 ; j <= 9 ;j++){
           document.write("<tr>");
           for (var i = 1 ; i <= j ; i++){
               document.write("<td>");
               document.write(i +"×"+ j+"="+ i * j);
               document.write("</td>");
           }
           document.write("</tr>");
       }

       document.write("</table>")

       /*document.write("<br>");document.write("<br>");document.write("<br>");document.write("<br>");



       for (var b = 9 ; b >= 1 ;b--){
           for (var a = 1 ; a <= b ; a++){
               document.write(a +"×"+ b +"="+ a * b +"&nbsp;");
           }
           document.write("<br>");
       }


       document.write("<br>");document.write("<br>");document.write("<br>");document.write("<br>");*/




    </script>
</body>
</html>